﻿using BW.WMS.Core.Models;
using BW.WMS.Domain.Entities.Basics;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.WMS.Domain.Entities.Product
{
    /// <summary>
    /// 产品模型
    /// </summary>
    public class ProductModel
    {

        /// <summary>
        /// 主键Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 货品编号
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string ProductCode { get; set; }

        /// <summary>
        /// 货品名称
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string ProductName { get; set; }

        /// <summary>
        /// 状态（0-禁用，1-启用）
        /// </summary>
        public bool? Status { get; set; }

        /// <summary>
        /// 货品类型（关联ProductType表Id）
        /// </summary>
        public long? ProductTypeId { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [MaxLength(100)]
        public string Specification { get; set; }

        /// <summary>
        /// 单位（如：台、个、片）
        /// </summary>
        [MaxLength(20)]
        public string Unit { get; set; }

        /// <summary>
        /// 条码
        /// </summary>
        [MaxLength(50)]
        public string BarCode { get; set; }

        /// <summary>
        /// 供应商（关联供应商表Id）
        /// </summary>
        public long? SupplierId { get; set; }

        /// <summary>
        /// 客户名称（关联客户表Id）
        /// </summary>
        public long? ClientNameId { get; set; }

        /// <summary>
        /// 入库参考价
        /// </summary>
        public decimal? WarehousingPrice { get; set; }

        /// <summary>
        /// 出库参考价
        /// </summary>
        public decimal? OutboundPrice { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public int? Number { get; set; }

        /// <summary>
        /// 库存金额
        /// </summary>
        public decimal? Price { get; set; }

        /// <summary>
        /// 保质期管理（0-不管理，1-管理）
        /// </summary>
        public bool? ExpirationDateStatus { get; set; }

        /// <summary>
        /// 保质期（格式自定义，如：2025-12-31）
        /// </summary>
        [MaxLength(50)]
        public string ExpirationDate { get; set; }

        /// <summary>
        /// 预警天数
        /// </summary>
        public int? WarningDate { get; set; }

        /// <summary>
        /// 创建人名称
        /// </summary>
        [MaxLength(50)]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改人名称
        /// </summary>
        [MaxLength(50)]
        public string UpdateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否删除（0-未删除，1-已删除）
        /// </summary>
        public bool? IsDeleted { get; set; }

       /// <summary>
       /// 仓库名称
       /// </summary>
        [MaxLength(100)]
        public string WarehouseName { get; set; }

        /// <summary>
        /// 库位名称
        /// </summary>
        [MaxLength(100)]
        public string LocationName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(500)]
        public string Remark { get; set; }
    }
}
